/*
 * @Author: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @Date: 2022-10-24 15:53:46
 * @LastEditors: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @LastEditTime: 2022-10-25 19:08:47
 * @FilePath: \v-shop\code\src\http\users\api.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '../request'

// users渲染数据
export function users(data) {
    return request({
        url: "users",
        method: "get",
        params: data
    })
}
// users添加数据
export function tjsj(data) {
    return request({
        url: "users",
        method: "post",
        data
    })
}

// users修改数据
export function xgsj(data) {
    return request({
        url: `users/${data.id}`,
        method: "put",
        data
    })
}
// users删除数据
export function scsj(data) {
    return request({
        url: "users/" + data.id,
        method: "delete",
        data
    })
}

// users修改状态
export function xgzt(data) {
    return request({
        url: `users/${data.id}/state/${data.mg_state}`,
        method: "put",
        data
    })
}

// users分配权限
export function fpqx(data) {
    return request({
        url: `users${data.id}/role`,
        method: "put",
        data
    })
}

